
import java.sql.*;

/**
 *
 * @author Mario
 */
public class conexionServidores {

    public static Connection getConexion() throws SQLException{
        try{
            Class.forName("com.mysql.jdbc.Driver");
            System.out.println("Conectando a la base de datos");
            return DriverManager.getConnection("jdbc:mysql://localhost/cco", "root", "koka1kola");
        }
        catch (ClassNotFoundException e){
            throw new SQLException(e.getMessage());
        }
    }
}
